package com.Proxy;

import java.lang.reflect.Proxy;

public class MainTest {


    public static void main(String[] args) {


        ProxyTestInvocationHandlerImpl invocationHandler=new ProxyTestInvocationHandlerImpl();
        ProxyTest proxyTestInstance=new ProxyTestImpl();
        invocationHandler.setProxyTest(proxyTestInstance);
        ProxyTest   proxyTest=  (ProxyTest) Proxy.newProxyInstance(proxyTestInstance.getClass().getClassLoader(),
                proxyTestInstance.getClass().getInterfaces(),invocationHandler);
        proxyTest.send("hello");

    }


}
